Top Secret Crypto Gold for Windows
...................................

Copyright  2000 - 2005 by TAN$TAAFL Software Company
			   

This source code is NOT IN THE PUBLIC DOMAIN and is NOT OPEN SOURCE.
It is provided solely for the purpose of letting you determine how
the program works, and that there are no backdoors or hidden code
in the program. Anyone that wants to use any portion of this code
in their own program please contact the author at the following e-mail address:

			   MacGregor K. Phillips

			   mkp@topsecretcrypto.com

Top Secret Crypto Gold is a Win32 program written in C and assembly language using Microsoft
Visual C/C++ 6.0 SP6 and using the Windows Server 2003 Plateform SDK of Feb. 2003. Everything required to compile and test the program is included in the source code listings except for the Wintertree Sentry Spelling Checker DLL and dictionaries. This is a licensed program by TAN$TAAFL Software Company. If you desire to use the Sentry Spelling Checker in your own programs you will have to purchase your own license. Because of this, the code that accesses the Spell Checker has been left in the program but it has been commented out so it will not compile.

The header file and library file for the HTML Help System, and the library file for Zlib are
included in the Include and Lib folders. You should move these files to the Include and Lib
folders under the MSVC folder, or modify the Project Settings to point to these
additional Include and Library files.

If you desire to download the complete HTML Help Workshop, which includes these files, you can
do so at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp

To download the latest version of Zlib, 1.2.2, go here: 

http://www.zlib.net/.

If you desire to purchase your own license for the Sentry Spelling Checker go here:

http://www.wintertree-software.com/index.html

All of the files, except the ones for the Sentry Spelling Checker required for installation
are included in the Install folder, along with the Inno Setup script. You will have to add the
compiled program, and change the folder pointers in the script file before you can create the
installation exe file. To download the Inno Setup program, which is free for commercial use,
go here:

http://www.jrsoftware.org/

Once you have compiled the program a 16 byte Md5 check value must be calculated and embedded in
the program. This allows the program to check itself to make sure it has not been altered in
any way. In the Md5 Exe Program folder I have included an old DOS program, Md5.exe, that does
this. The source code for the program is also included which requires Microsoft Macro Assembler
Version 6.0 or above.

To run this program I found it is best to add it to the Tools menu for Microsoft Visual C++
using the Customize menu item under the Tools menu. For the Menu Contents I use "Embed Md5 Check
Value" which will appear under the Tools menu. For the Command use the path and file name
of the program. For Arguments use: Tsc.exe. For Initial Directory use: $(TargetDir). This allows
you to embed the Md5 check value in the Debug or Release version of the program. Once you have
compiled Top Secret Crypto Gold in either the Debug or Release version, just click on Embed Md5
Check Value under the Tools menu. The program will then be ready to run.

I have made the following changes to a few of the Windows header files which you will have to
make for the program to compile correctly. Depending on the Windows header files on your
system, you may have to make some or all of the changes.

Winuser.h
---------

Changed this

	typedef struct tagNMHDR
	{
	    HWND  hwndFrom;
	    UINT  idFrom;
	    UINT  code;         // NM_ code
	}   NMHDR;
	typedef NMHDR FAR * LPNMHDR;

to This:

	typedef struct tagNMHDR
	{
	    HWND  hwndFrom;
	    UINT  idFrom;
	    UINT  code;         // NM_ code
	}   NMHDR, *LPNMHDR;
	//typedef NMHDR FAR * LPNMHDR;


Richedit.h
----------

Changed this:

	typedef struct _msgfilter
	{
		NMHDR	nmhdr;
		UINT	msg;
		_WPAD	_wPad1;
		WPARAM	wParam;
		_WPAD	_wPad2;
		LPARAM	lParam;
	} MSGFILTER;

to this:

	typedef struct _msgfilter
	{
		NMHDR	nmhdr;
		UINT	msg;	
		_WPAD	_wPad1;
		WPARAM	wParam;
		_WPAD	_wPad2;
		LPARAM	lParam;
	} MSGFILTER, *LPMSGFILTER;

Changed this:

	typedef struct _enlink
	{
	    NMHDR nmhdr;
	    UINT msg;
	    _WPAD   _wPad1;
	    WPARAM wParam;
	    _WPAD   _wPad2;
	    LPARAM lParam;
	    CHARRANGE chrg;
	} ENLINK;

to this:

	typedef struct _enlink
	{
	    NMHDR nmhdr;
	    UINT msg;
	    _WPAD   _wPad1;
	    WPARAM wParam;
	    _WPAD   _wPad2;
	    LPARAM lParam;
	    CHARRANGE chrg;
	} ENLINK, *LPENLINK;

Winver.h
--------

Changed this:

	typedef struct tagVS_FIXEDFILEINFO
	{
	    DWORD   dwSignature;            /* e.g. 0xfeef04bd */
	    DWORD   dwStrucVersion;         /* e.g. 0x00000042 = "0.42" */
    	    DWORD   dwFileVersionMS;        /* e.g. 0x00030075 = "3.75" */
   	    DWORD   dwFileVersionLS;        /* e.g. 0x00000031 = "0.31" */
   	    DWORD   dwProductVersionMS;     /* e.g. 0x00030010 = "3.10" */
	    DWORD   dwProductVersionLS;     /* e.g. 0x00000031 = "0.31" */
	    DWORD   dwFileFlagsMask;        /* = 0x3F for version "0.42" */
	    DWORD   dwFileFlags;            /* e.g. VFF_DEBUG | VFF_PRERELEASE */
	    DWORD   dwFileOS;               /* e.g. VOS_DOS_WINDOWS16 */
	    DWORD   dwFileType;             /* e.g. VFT_DRIVER */
	    DWORD   dwFileSubtype;          /* e.g. VFT2_DRV_KEYBOARD */
	    DWORD   dwFileDateMS;           /* e.g. 0 */
	    DWORD   dwFileDateLS;           /* e.g. 0 */
	} VS_FIXEDFILEINFO;

to this:

	typedef struct tagVS_FIXEDFILEINFO
	{
	    DWORD   dwSignature;            /* e.g. 0xfeef04bd */
	    DWORD   dwStrucVersion;         /* e.g. 0x00000042 = "0.42" */	
	    DWORD   dwFileVersionMS;        /* e.g. 0x00030075 = "3.75" */
	    DWORD   dwFileVersionLS;        /* e.g. 0x00000031 = "0.31" */
	    DWORD   dwProductVersionMS;     /* e.g. 0x00030010 = "3.10" */
	    DWORD   dwProductVersionLS;     /* e.g. 0x00000031 = "0.31" */
	    DWORD   dwFileFlagsMask;        /* = 0x3F for version "0.42" */
	    DWORD   dwFileFlags;            /* e.g. VFF_DEBUG | VFF_PRERELEASE */
	    DWORD   dwFileOS;               /* e.g. VOS_DOS_WINDOWS16 */
	    DWORD   dwFileType;             /* e.g. VFT_DRIVER */
	    DWORD   dwFileSubtype;          /* e.g. VFT2_DRV_KEYBOARD */
	    DWORD   dwFileDateMS;           /* e.g. 0 */
	    DWORD   dwFileDateLS;           /* e.g. 0 */
	} VS_FIXEDFILEINFO, *LPVS_FIXEDFILEINFO;

